import { deleteAction, getAction, httpAction, postAction, putAction } from '@/api/manage'

//数据字典
const getDictList = (params) => getAction("/sys/dictItem/list", params);
// 获取模板数据
const getTemplateInfo = (params) => getAction("/rspc/rspcReportTemplate/queryById", params);
// 报表模板表-通过报表批次和报表代码查询
const getTemplateList = (params) => getAction("/rspc/rspcReportTemplate/queryByInfo", params);
// 保存模板内容id和mbnr
const addTemplateFile = (params) => putAction("/rspc/rspcReportTemplate/updateMbnr", params);
// 获取区域接口:
const getRangeInfo = (params) => getAction("/rspc/rspcReportRange/list", params);
// 保存区域接口新增
const getRangeAdd = (params) => postAction("/rspc/rspcReportRange/add", params);
// 保存区域接口修改
const getRangeEdit = (params) => putAction("/rspc/rspcReportRange/edit", params);
// 获取栏位配置接口
const getReportColInfo = (params) => getAction("/rspc/rspcReportCol/list", params);
// 保存栏位配置接口新增 
const getReportColAdd = (params) => postAction("/rspc/rspcReportCol/add", params);
// 保存栏位配置接口修改
const getReportColEdit = (params) => putAction("/rspc/rspcReportCol/edit", params);
// 栏位配置接口删除
const getReportColDelete = (params) => deleteAction("/rspc/rspcReportCol/delete", params);
// 获取指标配置接口
const getReportItemInfo = (params) => getAction("/rspc/rspcTemplateItem/list", params);
// 保存指标配置接口新增
const getReportItemAdd = (params) => postAction("/rspc/rspcTemplateItem/add", params);
// 保存指标配置接口修改（参数加3个属性 模板编码mbbm 列号lh 行号hh）
const getReportItemEdit = (params) => putAction("/rspc/rspcTemplateItem/edit", params);
// 指标模板关系-通过id删除
const deleteReportItem = (params) => deleteAction("/rspc/rspcTemplateItem/delete", params);
// 指标模板关系-批量删除
const deleteReportItems = (params) => deleteAction("/rspc/rspcTemplateItem/deleteBatch", params);
// 指标模板关系-批量处理
const editTemplateItem = (params) => postAction("/rspc/rspcTemplateItem/editInfo", params);
// 报表下拉接口
const getReportMeta = (params) => getAction("/rspc/rspcReportMeta/all", params);
// 单个报表数据
const getReportMetaItem = (params) => getAction("/rspc/rspcReportMeta/queryById", params);
// 根据报表ID和指标代码获取信息接口参数bbid/zbdm
const getReportMetaInfo = (params) => getAction("/rspc/rspcReportItem/queryByInfo", params);
// 指标列表 搜索接口 
const getReportTargetList = (params) => getAction("/rspc/rspcReportItem/list", params);
// 整体保存接口:   id和zbmb
const updateZbmb = (params) => postAction("/rspc/rspcReportItem/updateZbmb", params);
// 获取责任人配置接口
const getReportLiablerList = (params) => getAction("/rspc/rspcReportLiabler/list", params);
// 保存责任人配置接口新增 
const getReportLiablerAdd = (params) => postAction("/rspc/rspcReportLiabler/add", params);
// 保存责任人配置接口修改
const getReportLiablerEdit = (params) => putAction("/rspc/rspcReportLiabler/edit", params);
// 责任人配置接口删除
const getReportLiablerDelete = (params) => deleteAction("/rspc/rspcReportLiabler/delete", params);
// /rspc/rspcReportLiabler/editInfo
const setReportLiablerEditInfo = (params) => putAction("/rspc/rspcReportLiabler/editInfo", params);
// 列表：/rspc/rspcReportData/queryInfos 
const getReportDataList = (params) => getAction("/rspc/rspcReportData/queryInfos", params);
// 数据存储表-修改信息
const setReportDataEditInfo = (params) => postAction("/rspc/rspcReportData/editInfos", params);
// 模板列表
const getTemplate = (params) => getAction("/rspc/rspcReportTemplate/list", params);
// 报表状态表详情
const getllbbReportById = (params) => getAction("/reportstatus/llbbReportStatus/queryById", params);
// 数据存储表-编辑
const editReportData = (params) => putAction("/rspc/rspcReportData/edit", params);
// 附加参数列表
const getReportParam = (params) => getAction("/rspc/rspcReportParam/nlist", params);
// 附加参数修改
const editReportParam = (params) => putAction("/rspc/rspcReportParam/edit", params);
// 附加参数添加
const addReportParam = (params) => postAction("/rspc/rspcReportParam/add", params);
// 附加参数删除
const deleteReportParam = (params) => deleteAction("/rspc/rspcReportParam/delete", params);
// 报表列表
const getMetaList = (params) => getAction("/rspc/rspcReportMeta/list", params);
// 指标新增
const addReportMeta = (params) => postAction("/rspc/rspcReportItem/add", params);
// 保存数据集配置: 
const addDataset = (params) => postAction("/rspc/rspcReportDataset/add", params);
// 修改数据集配置: 
const editDataset = (params) => putAction("/rspc/rspcReportDataset/edit", params);
// 数据集回显接口: 
const queryDataset = (params) => postAction("/rspc/rspcReportDataset/queryById", params);
// 查询数据集数据: 
const queryDatasetData = (params) => getAction("/rspc/rspcReportDataset/queryListByInfo", params);
// 数据集数据批量修改:      
const editDatasetData = (params) => getAction("/rspc/rspcReportRange/editJson", params);
// 查询数据集配置
const queryDatasetDataList = (params) => getAction("/rspc/rspcReportDataset/list", params);
// 指标数据集-通过id删除
const deleteDatasetData = (params) => deleteAction("/rspc/rspcReportDataset/delete", params);
// 数据检核规则表-添加
const addReportVerify = (params) => postAction("/rspc/rspcReportVerify/add", params);
// 数据检核规则表-通过id删除
const deleteReportVerify = (params) => deleteAction("/rspc/rspcReportVerify/delete", params);
// 数据检核规则表-编辑
const editReportVerify = (params) => putAction("/rspc/rspcReportVerify/edit", params);
// 数据检核规则表-分页列表查询
const getReportVerify = (params) => getAction("/rspc/rspcReportVerify/list", params);
// 数据集相关表
const findAllFrom = (params) => getAction("/rspc/rspcReportDataset/findAll", params);
// 查出对应表的所有字段     参数是tableName
const findAllColumns = (params) => getAction("/rspc/rspcReportDataset/findAllColumns", params);
// sys/dict/loadTreeData
const loadTreeData = (params) => getAction("sys/dict/loadTreeData", params);
// 中转HTTP请求
export const transitRESTful = {
  get: (url, parameter) => getAction(getTransitURL(url), parameter),
  post: (url, parameter) => postAction(getTransitURL(url), parameter),
  put: (url, parameter) => putAction(getTransitURL(url), parameter),
  http: (url, parameter) => httpAction(getTransitURL(url), parameter),
  delete: (url, parameter) => deleteAction(getTransitURL(url), parameter),
}

export {
  getTemplateInfo,
  addTemplateFile,
  getRangeInfo,
  getRangeAdd,
  getRangeEdit,
  getReportColInfo,
  getReportColAdd,
  getReportColEdit,
  getReportItemInfo,
  getReportItemAdd,
  getReportItemEdit,
  getReportMeta,
  getReportMetaItem,
  getReportMetaInfo,
  getReportTargetList,
  updateZbmb,
  getReportColDelete,
  getReportLiablerList,
  getReportLiablerAdd,
  getReportLiablerEdit,
  getReportLiablerDelete,
  setReportLiablerEditInfo,
  getReportDataList,
  setReportDataEditInfo,
  getTemplate,
  getTemplateList,
  getllbbReportById,
  editReportData,
  deleteReportItem,
  deleteReportItems,
  editTemplateItem,
  getReportParam,
  editReportParam,
  addReportParam,
  getDictList,
  getMetaList,
  addReportMeta,
  addDataset,
  editDataset,
  queryDataset,
  queryDatasetData,
  editDatasetData,
  queryDatasetDataList,
  deleteDatasetData,
  addReportVerify,
  deleteReportVerify,
  editReportVerify,
  getReportVerify,
  deleteReportParam,
  findAllFrom,
  findAllColumns,
  loadTreeData,
}



